package cn.edu.hqu.cst.android.wzc.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

public class UC1 extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_uc1);
        Button bt1=(Button)findViewById(R.id.button9);
        Button bt2=(Button)findViewById(R.id.button6);
        Button bt3=(Button)findViewById(R.id.button7);
        Button bt4=(Button)findViewById(R.id.button8);
        LinearLayout linear1=(LinearLayout)findViewById(R.id.linear1);

        bt1.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                finish();
            }
        });
        bt2.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                linear1.setOrientation(LinearLayout.HORIZONTAL);
            }
        });
        bt3.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                linear1.setOrientation(LinearLayout.VERTICAL);
            }
        });
        bt4.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                linear1.setGravity(Gravity.START|Gravity.CENTER);
            }
        });
    }
}